<%@ page contentType="text/html; charset=utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />


<script src="${pageContext.request.contextPath }/scripts/boot.js"
	type="text/javascript"></script>

<style type="text/css">
    html, body{
        margin:0;padding:0;border:0;width:100%;height:100%;overflow:hidden;
    }    
</style>
	

</head>
<body>
	
	
	
	
	<div  style="width:100%;">
		
		<div class="mini-toolbar" style="border-bottom:0;padding:0px;">
			<table style="width:100%;">
				<tr>
					<td style="width:100%;"><a class="mini-button"
						iconCls="icon-edit" onclick="edit()">编辑</a></td>
					
					<td style="white-space:nowrap;text-align:right;">
						<input id="key1"class="mini-textbox" emptyText="请输入单位编号" style="width:150px;" onenter="onKeyEnter" />
						<input id="key2" class="mini-textbox" emptyText="请输入单位名称" style="width:150px;" onenter="onKeyEnter" />
						
						<a class="mini-button" onclick="search()" iconCls="icon-search">查询</a>
						<a class="mini-button" onclick="reset()" iconCls="icon-remove">重置</a>
						</td>
				</tr>
				
			</table>
		</div>
	</div>
	<div class="mini-fit">
		<div id="datagrid1" class="mini-datagrid"
			style="width:100%;height:100%;" allowResize="true"
			url="AB01_ARMY.do?method=getAB01" idField="id" multiSelect="true">
			<div property="columns">
				<!--<div type="indexcolumn"></div>        -->
				<div type="checkcolumn"></div>

				<div field="aab999" width="120" headerAlign="center" allowSort="true">劳动保障证号</div>
				<div field="aab004" width="120" headerAlign="center" allowSort="true">单位名称</div>
				<div field="aab019" width="120" headerAlign="center" allowSort="true">单位类型</div>
				<div field="aae004" width="120" headerAlign="center" allowSort="true">联系人姓名</div>
				<div field="aae005" width="120" headerAlign="center" allowSort="true">联系电话</div>
				<div field="aae051" width="120" headerAlign="center" allowSort="true">批准成立文号</div>
				<div field="aae048" width="120" headerAlign="center" allowSort="true">批准成立部门</div>
				<div field="aae049" width="120" headerAlign="center" allowSort="true">批准成立日期</div>

			</div>
		</div>
	</div>


	<script type="text/javascript">
		mini.parse();

		var grid = mini.get("datagrid1");
		grid.load();

		function edit() {

			var row = grid.getSelected();
			if (row) {
				mini.open({
					url : bootPATH + "../page/AB01/AB01BD/AB01BD_edit.jsp",
					title : "编辑",
					width : 700,
					height : 460,
					onload : function() {
						var iframe = this.getIFrameEl();
						var data = {
							action : "edit",
							id : row.aab999
						};

						iframe.contentWindow.SetData(data);

					},
					ondestroy : function(action) {
						grid.reload();

					}
				});

			} else {
				mini.alert("请选中一条记录");
			}

		}

		function search() {
			var key1 = mini.get("key1").getValue().trim();
			var key2 = mini.get("key2").getValue().trim();
			
			if(key1=="" && key2==""){
				mini.alert("请输入查询条件！");
				return;
			}
			
			
			grid.load({
				key1 : key1,
				key2 : key2
				
			});
			
			
		}
		function reset(){
			mini.get("key1").setValue("");
			mini.get("key2").setValue("");
			
		}
		function onKeyEnter(e) {
			search();
		}
	</script>


</body>
</html>
